{% extends 'base.html' %}

{% block content %}
  <h4>荣誉类型列表</h4>
  <a href="{% url 'core:honor_type_create' %}" class="btn btn-primary btn-sm me-2"><i class="bi bi-plus-circle me-2"></i>添加新荣誉类型</a>
  <div class="container mt-4">
    <div class="table-responsive">
      <table class="table table-striped table-hover">
        <thead class="table-dark">
          <tr>
            <th>荣誉类型名称</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          {% for honor_type in honor_types %}
            <tr>
              <td>{{ honor_type.name }}</td>
              <td>
                <a href="{% url 'core:honor_type_update' honor_type.pk %}" class="btn btn-sm btn-primary"><i class="bi bi-pencil me-1"></i>编辑</a>
                <a href="{% url 'core:honor_type_delete' honor_type.pk %}" class="btn btn-sm btn-danger"><i class="bi bi-trash me-1"></i>删除</a>
              </td>
            </tr>
          {% empty %}
            <tr>
              <td colspan="2" class="text-center">暂无荣誉类型。</td>
            </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
  </div>
{% endblock %}